package org.d10_data_stream;

import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * 目标：数据输出流
 */
public class DataOutPutStreamTest1 {
    public static void main(String[] args) {
        //1. 创建一个数据输出流包装低级的字节输出流
        try (
           DataOutputStream dos =  new DataOutputStream
                ( new FileOutputStream("D:\\idea\\idea code\\java-practice\\practice\\change\\file-oi-app\\src\\test\\d9test.txt"));
        ){

         dos.writeInt(97);
         dos.writeDouble(78.8);
         dos.writeBoolean(true);
         dos.writeUTF("黑妈妈好时代公得到馆sdjd");


            } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
